﻿using Microsoft.ApplicationBlocks.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DevExpressWebApplication1.Utils
{
    public class CustomerUtils
    {
        public static Boolean Insert(string customerName, string company, string phone, string dob, string address,string group_id)
        {
            int id = SqlHelper.ExecuteNonQuery(DataServices.ConnectString, "sp_Customer_Insert", customerName, address, phone, dob, company, 1, group_id);
            bool isSuccess = false;
            if (id > 0)
                isSuccess = true;
            return isSuccess;
        }

        public static Boolean Update(string customer_id, string customerName, string company, string phone, string dob, string address,string group_id)
        {
            int id = SqlHelper.ExecuteNonQuery(DataServices.ConnectString, "sp_Customer_Update", customer_id, customerName, company, phone, dob, address,group_id);
            bool isSuccess = false;
            if (id > 0)
                isSuccess = true;
            return isSuccess;
        }
    }
}